package com.xiaoluo.common.queue;

import com.xiaoluo.common.enums.JobTypeEnum;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

/**
 * Project : XL-CD
 * Package : com.xiaoluo.common.queue
 * Created by Willian.
 * Date  : 2016/1/8 17:05.
 */
public class BuildLogMap {

    private static ConcurrentMap<String,List<String>> map = new ConcurrentHashMap<String, List<String>>();

    public static void add(String key,String line){
        if(map.get(key) != null){
            map.get(key).add(line);
        }else {
            List<String> list = new ArrayList<String>();
            list.add(line);
            map.put(key,list);
        }
    }
    public static List<String> get(String key){
        return map.get(key);
    }
    public static void remove(String key){
        map.remove(key);
    }
}
